﻿using Pay.DTO;
using Pay.TO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Pay.IService
{
    public interface IPlayingService
    {
        /// <summary>
        /// 获得赛事列表
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<playing_dto> GetPlayings(PlayingQuery query);

        /// <summary>
        /// 获得赛事
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        playing_dto GetPlaying(long id);

        /// <summary>
        /// 新增赛事
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int AddPlaying(playing_dto dto);

        /// <summary>
        /// 更新赛事
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        int UpdatePlaying(playing_dto dto);

        /// <summary>
        /// 后台赛事参与统计（查看参与队伍）
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<playing_statistics_model> GetPlayingStatistics(PageQuery query);

        /// <summary>
        /// 后台赛事参与用户
        /// </summary>
        /// <param name="query"></param>
        /// <returns></returns>
        PagedResult<user_guess_playing_his_dto> GetUserGuessPlayingHiss(UserGuessPlayingHisQuery query);
        /// <summary>
        /// 用户竞猜
        /// </summary>
        /// <param name="dto"></param>
        /// <returns></returns>
        bool SaveUserGuess(user_guess_dto dto);
        // 处理用户竞猜
        void DealUserGuess(long userId);
    }
}
